<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .yeye{
            width: 300px;
            height: 300px;
            background: palegoldenrod;
        }
        .father{
            width: 200px;
            height: 200px;
            background: palegreen;
        }
        .son{
            width: 100px;
            height: 100px;
            background: palevioletred;
        }
    </style>
</head>
<body>
    <div class="yeye">
        <div class="father">
            <div class="son"></div>
        </div>
    </div>
    <script>
        var yeye = document.querySelector('.yeye')
        var father = document.querySelector('.father')
        var son = document.querySelector('.son')

        yeye.onclick = function(){
            console.log('yeye')
        }
        father.onclick = function(e){
            console.log('father')
            e.stopPropagation()
            e.cancelBubble = true
        }
        son.onclick = function(){
            console.log('son')
        }

    </script>
</body>
</html>